package com.ce.server.pojo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author 郑爽
 * @since 2021-11-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_hscheck")
@ApiModel(value="Hscheck对象", description="")
public class Hscheck implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "学生学号")
    @Excel(name = "学号")
    private String sno;

    @ApiModelProperty(value = "核酸检测结果，阴性或者阳性")
    @TableField("hs_result")
    @Excel(name = "核酸结果")
    private String hsResult;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createtime;

    @ApiModelProperty(value = "出核酸检测结果时间")
    @TableField("hs_result_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime hsResultTime;

    @ApiModelProperty(value = "核酸检测人员id")
    @Excel(name = "核酸检测员工号")
    private String wno;


    @ApiModelProperty(value = "员工")
    @TableField(exist = false)
    @ExcelEntity
    private Admin admin;

    @ApiModelProperty(value = "学生")
    @TableField(exist = false)
    @ExcelEntity
    private Student student;


}
